package com.wang.test;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class Websocket {

	public static void main(String[] args) {
		try {
			ServerSocket serverSocket = new ServerSocket(10000);
			Socket accept = serverSocket.accept();
			System.out.println("等待接收信息！");
			InputStream inputStream = accept.getInputStream();
			InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
			BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
			String readLine = bufferedReader.readLine();
			System.out.println(readLine);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
